<div class="wrapper-md ng-scope">
<div class="row" novalidate>

    <div class="panel panel-default">
      <tabset class="tab-container" >

        <tab heading="字典列表" ng-click="cancel()" active="status.active">
          <div class="row wrapper" >
            <div class="col-sm-5 m-b-xs">
              <div class="input-group" >
                <div class="input-group-btn" >
                  <span class="btn btn-default">类型</span>
                </div>
                <ui-select ng-model="search.item" theme="bootstrap">
                  <ui-select-match placeholder="选择">{{$select.selected.value}}</ui-select-match>
                  <ui-select-choices repeat="item in dict_sel | filter: $select.search">
                    <span ng-bind-html="item.value"></span>
                  </ui-select-choices>
                </ui-select>
              </div>
            </div>
            <div class="col-sm-2 m-b-xs">
              <input type="text" class="form-control" ng-model="search.label" placeholder="标签">
            </div>
            <div class="col-sm-2 m-b-xs">
              <input type="text" class="form-control" ng-model="search.description" placeholder="描述">
            </div>
            
            
            <button class="btn m-b-xs w-xs btn-success" ng-click="search()">搜索</button>
          </div>

          <div class="panel-body">
            <table class="table table-striped table-bordered ng-isolate-scope dataTable no-footer" 
              style="display: table; width: 100%;table-layout:fixed;">
              <thead>
                <tr>
                  <th style="width: 5%;text-align:center">键值</th>
                  <th style="width: 12%;text-align:center">标签名</th>
                  <th style="width: 10%;text-align:center">类型</th>
                  <th style="width: 8%;text-align:center">描述</th>
                  <th style="width: 4%;text-align:center">排序</th>
                  <th style="width: 7%;text-align:center">操作</th>
                </tr>
              </thead>
              <tbody>
                <tr ng-repeat="dict in dict_list">
                  <td class="text-center">{{dict.value}}</td>
                  <td style="word-wrap: break-word">{{dict.label}}</td>
                  <td>{{dict.type}}</td>
                  <td>{{dict.description}}</td>
                  <td class="text-center">{{dict.sort}}</td>
                  <td>
                    <button type="button" class="btn btn-info btn-xs" ng-click="add(dict)">添加</button>
                    <button type="button" class="btn btn-info btn-xs" ng-click="update(dict)">修改</button>
                    <button type="button" class="btn btn-danger btn-xs" ng-click="delete($index)">删除</button>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
          <div class="text-right" style="background-color: white">
            <pagination total-items="totalItems" ng-model="currentPage" ng-change="change(currentPage)" previous-text="上一页"
                next-text="下一页" first-text="首页" last-text="尾页" max-size="5" boundary-links="true" rotate="false"
                items-per-page="itemsPerPage" class="m-t-none m-b"></pagination>
          </div>
        </tab>

        <tab heading="{{tabname.name}}" ng-click="add()" active="tabname.active">
          <div class="panel-body">
            <form name="form" class="form-horizontal form-validation ng-pristine ng-valid ng-valid-required">
              <div class="form-group">
                <label class="col-lg-2 control-label">键值:</label>
                <div class="col-lg-4">
                  <input type="text" class="form-control" placeholder="必填" ng-model="obj.value">
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">标签名:</label>
                <div class="col-lg-4">
                  <input type="text" class="form-control" placeholder="必填" ng-model="obj.label">
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">类型:</label>
                <div class="col-lg-4">
                  <input type="text" class="form-control" placeholder="必填" ng-model="obj.type">
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">描述:</label>
                <div class="col-lg-4">
                  <input type="text" class="form-control" ng-model="obj.description">
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">所属模块:</label>
                <div class="col-lg-4">
                  <input type="text" class="form-control" placeholder="center名称,如:sc、tc" ng-model="obj.type_category">
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">字典类型:</label>
                <div class="col-lg-4">
                  <div class="radio">
                    <label class="i-checks">
                      <input type="radio" ng-model="obj.dict_type" ng-value="false" ><i></i>系统固有
                    </label>
                    <label class="i-checks" style="margin-left: 10px">
                      <input type="radio" ng-model="obj.dict_type" ng-value="true" ><i></i>业务
                    </label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">排序:</label>
                <div class="col-lg-4">
                  <input type="number" class="form-control" ng-model="obj.sort">
                </div>
              </div>
              <div class="form-group">
                <label class="col-lg-2 control-label">备注:</label>
                <div class="col-lg-4">
                  <textarea id="remarks" class="form-control" rows="3" ng-model="obj.remarks"></textarea>
                </div>
              </div>
            </form>
            <div class="col-lg-2"></div>
            <div class="col-lg-3">
              <button class="btn btn-primary btn-rounded" ng-click="save()">保存</button>
              <button class="btn btn-default btn-rounded" ng-click="cancel()">取消</button>
            </div>
          </div>
        </tab>


      </tabset>

      
      

      



    </div>

</div>
</div>


